{% extends 'base.html' %}
{% load static %}
{% block content %}

<style>
    .form-control:focus {
        box-shadow: none;
        border-color: #4e73df;
    }

    .card {
        border-radius: 10px;
    }

    .btn-primary {
        background-color: #4e73df;
        border-color: #4e73df;
    }

    .btn-primary:hover {
        background-color: #3a5fcd;
        border-color: #3a5fcd;
    }

    label {
        font-weight: 600;
    }

    .form-text {
        color: #888;
    }


</style>

<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="card shadow-sm border-0">
                <div class="card-header bg-success text-white text-center py-4">
                    <h4 class="mb-0">🌾 录入农产品信息</h4>
                </div>
                <div class="card-body p-4">

                    <form method="post" enctype="multipart/form-data">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="{{ form.product_name.id_for_label }}" class="form-label">商品名称</label>
                            {{ form.product_name }}
                            <div class="form-text">请填写农产品的商品名。</div>
                        </div>


                        <div class="mb-3">
                            <label for="{{ form.raw_material_source.id_for_label }}" class="form-label">原材料来源</label>
                            {{ form.raw_material_source }}
                            <div class="form-text">请填写农产品的原材料产地、供应商等信息。</div>
                        </div>

                        <div class="mb-3">
                            <label for="{{ form.production_process.id_for_label }}" class="form-label">生产过程</label>
                            {{ form.production_process }}
                            <div class="form-text">描述产品从种植到加工的全过程。</div>
                        </div>

                        <div class="mb-3">
                            <label for="{{ form.inspection_batch.id_for_label }}" class="form-label">检验批次</label>
                            {{ form.inspection_batch }}
                            <div class="form-text">请输入产品的检测批次编号。</div>
                        </div>

                        <div class="mb-3">
                            <label for="{{ form.logistics_flow.id_for_label }}" class="form-label">物流流转</label>
                            {{ form.logistics_flow }}
                            <div class="form-text">记录运输路径及方式。</div>
                        </div>

                        <div class="mb-3">
                            <label for="{{ form.anti_counterfeiting_certification.id_for_label }}" class="form-label">防伪鉴证</label>
                            {{ form.anti_counterfeiting_certification }}
                            <div class="form-text">提供防伪码或二维码信息。</div>
                        </div>
                        <div class="mb-3">
                            <label for="{{ form.product_image.id_for_label }}" class="form-label">产品图片</label>
                            {{ form.product_image }}
                            <div class="form-text">请上传农产品的实物图片。</div>
                        </div>
                        <!-- 新增金额字段 -->
                        <div class="mb-3">
                            <label for="{{ form.price.id_for_label }}" class="form-label">商品价格</label>
                            {{ form.price }}
                            <div class="form-text">请输入商品的价格（单位：元）。</div>
                        </div>


                        <div class="d-grid">
                            <button type="submit" class="btn btn-success btn-lg mt-3">提交信息</button>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}
